[SCRUM-241] 국문관광정보 API 동기화 구현 (#104)#134
Merged
Conversation
WebClient를 활용해 [국문 관광정보] 관광정보 동기화 목록 조회 API를 호출하고, 응답을 DTO로 파싱하는 코드를 구현했습니다.
[국문 관광정보] 관광정보 동기화 목록 조회 API를 통해 기존에 DB에 저장된 장소 중 업데이트된 장소를 감지하고 다시 공통정보 조회 API를 호출해 장소 정보를 동기화하는 기능을 구현했습니다. 만약 showflag가 0일 경우, 해당 장소를 삭제합니다.
기존 DB에 저장된 모든 코스를 조건에 따라 [국문 관광정보] 위치기반 관광정보 조회 API를 호출해 업데이트된 장소를 감지하고, 공통정보 조회 API를 다시 호출해 장소 정보를 동기화하는 기능을 구현했습니다.
위치 정보 동기화는 매주 월요일 새벽 2시에, 장소 정보 동기화는 매일 새벽 5시 30분에 실행되도록 스케줄러를 등록했습니다.
ssggii
reviewed
Sep 10, 2025
Contributor
ssggii
left a comment
There was a problem hiding this comment.
고생하셨습니다!!🥹 코멘트 드린 부분만 확인 한번 부탁드려요
src/main/java/com/server/running_handai/domain/spot/service/SpotDataService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/server/running_handai/domain/spot/scheduler/SpotScheduler.java
Outdated
Show resolved
Hide resolved
즐길거리 위치 정보 동기화 API에서 해당 코스와 연결된 모든 장소 연관관계를 모두 삭제하고 새로 생성하여 기존의 연관관계 정보가 유실되는 문제가 있었습니다. 따라서 전체 코스를 기준으로 DB와 위치기반 관광정보 조회 API 데이터를 비교하여 추가할 Spot과 삭제할 Spot을 선별하여 처리하도록 개선했습니다.
기존 새벽 2시에 설정한 즐길거리 위치 정보 동기화 작업의 실행 시간을 트래픽이 더 적은 새벽 4시로 변경했습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✏️ 연관 이슈
#104
⛳ 작업 내용
/sync-spots/date?date={YYYYMMDD})/sync-spots/location)💬리뷰 요구사항
📍 참고사항
externalId와 데이터의 표출, 비표출을 의미하는showflag만을 사용했습니다.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT설정을 추가했습니다.